/*
 * @Author: your name
 * @Date: 2020-02-21 16:48:18
 * @LastEditTime: 2020-02-22 17:33:30
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /dongyang/vue.config.js
 */
const Timestamp = new Date().getTime();
module.exports = {
  configureWebpack: { // webpack 配置
    output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
      filename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
      chunkFilename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
    },
  },
  css: {
    loaderOptions: {
      sass: {
        prependData: `@import "~@/styles/variables.scss";`
      },
      less: {
        // 尺寸相关在styles/vant.scss中修改
        modifyVars: {
          // Component Colors
          "text-color": "#333",
          // Button
          "button-small-height": "26px",
          "button-small-line-height": "24px",
          "button-primary-background-color": "#2c7ffa",
          "button-primary-border-color": "#2c7ffa",
          // Step
          "step-text-color": "#333",
          // Tab
          "tab-text-color": "#333",
          "tab-active-text-color": "#2c7ffa",
          // Tabs
          "tabs-default-color": "#2c7ffa",
          "tabs-line-height": "49px",
          "tabs-bottom-bar-color": "#2c7ffa",
          // TreeSelect
          "tree-select-item-active-color": "#2c7ffa"
        }
      }
    }
  },
  devServer: {
    // disableHostCheck: true,
    // proxy: {
    //   "/res": {
    //     target: "http://dy.alldong.com/",
    //     changeOrigin: true,
    //     pathRewrite: {
    //       "^/res": ""
    //     }
    //   }
    // }
  }
};
